package com.wang;

import com.wang.pojo.Cat;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication(scanBasePackages = "com.wang")//说明这是一个springboot应用

@EnableConfigurationProperties(Cat.class)
public class MainApplication {
    public static void main(String[] args) {

        ConfigurableApplicationContext context = SpringApplication.run(MainApplication.class, args);

        // Cat cat = context.getBean("cat", Cat.class);
        Cat cat = context.getBean("cat-com.wang.pojo.Cat", Cat.class);
        System.out.println(cat);
    }
}
